#pragma once

#include <QScopedPointer>
#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindowPrivate;
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void changeEvent(QEvent *e);

public Q_SLOTS:
    void OnPluginLoaded(const QString &modename, QWidget *widget, bool is_default);

private Q_SLOTS:
    void OnPluginToggled(bool checked);

Q_SIGNALS:
    void CurrentPluginChanged(const QString &plugin_name);

private:
    Ui::MainWindow *ui;
    const QScopedPointer<MainWindowPrivate> d_ptr;
    Q_DECLARE_PRIVATE(MainWindow)
};
